File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build code-server Docker Image
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ paths :
7+ - ' ./tutorial/Dockerfile'
8+ - ' ./tutorial/root/**'
9+ - ' .github/workflows/build-docker-tutorial.yml'
10+
11+ jobs :
12+ build-and-push :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Docker metadata
22+ uses : docker/metadata-action@v5
23+ id : metadata
24+ with :
25+ images : |
26+ ghcr.io/${{ github.repository_owner }}/bootcamp
27+ tags : |
28+ tutorial
29+ labels : |
30+ maintainer=${{ github.repository_owner }}
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v3
34+
35+ - name : Log in to GitHub Container Registry
36+ uses : docker/login-action@v3
37+ with :
38+ registry : ghcr.io
39+ username : ${{ github.repository_owner }}
40+ password : ${{ secrets.GITHUB_TOKEN }}
41+
42+ - name : Build and push Docker image
43+ uses : docker/build-push-action@v6
44+ with :
45+ context : tutorial
46+ platforms : linux/amd64
47+ push : ${{ github.ref == 'refs/heads/master' }}
48+ tags : ${{ steps.metadata.outputs.tags }}
49+ labels : ${{ steps.metadata.outputs.labels }}
You can’t perform that action at this time.
0 commit comments