-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.1 KB
/
depot-build-and-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: depot-build-and-push
on: push
jobs:
docker:
runs-on: ubuntu-24.04
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: depot/setup-action@v1
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push with sha + latest tag on master
if: github.ref == 'refs/heads/master'
uses: depot/build-push-action@v1
with:
project: b4qlt63xvg
platforms: linux/amd64,linux/arm64
push: true
tags: |
reclaimthestack/rails-example:latest
reclaimthestack/rails-example:sha-${{ github.sha }}
- name: Build and push with sha tag on feature branches
if: github.ref != 'refs/heads/master'
uses: depot/build-push-action@v1
with:
project: b4qlt63xvg
platforms: linux/amd64,linux/arm64
push: true
tags: |
reclaimthestack/rails-example:sha-${{ github.sha }}