File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker
2+
3+ on :
4+ push :
5+ branches : [main]
6+ tags :
7+ - v[0-9]+.[0-9]+.[0-9]+*
8+ pull_request :
9+ branches : [main]
10+
11+ jobs :
12+ build :
13+ name : Build image
14+
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Login to GitHub Container Registry
24+ uses : docker/login-action@v3
25+ with :
26+ registry : ghcr.io
27+ username : ${{ github.repository_owner }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Extract metadata (tags, labels) for Docker
31+ id : meta
32+ uses : docker/metadata-action@v5
33+ with :
34+ images : ghcr.io/${{ github.repository_owner }}/slack-strava-integration
35+ tags : |
36+ type=semver,pattern={{version}}
37+ type=semver,pattern={{major}}.{{minor}}
38+ type=semver,pattern={{major}}
39+ type=sha
40+ type=edge
41+ type=ref,event=pr
42+
43+ - name : Build Docker image (and push on main)
44+ uses : docker/build-push-action@v6
45+ with :
46+ push : true
47+ tags : ${{ steps.meta.outputs.tags }}
48+ labels : ${{ steps.meta.outputs.labels }}
49+ cache-from : type=gha
50+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments