File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Push Keycloak Masterclass VSCode Custom Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' keycloak/masterclass/vscode/Dockerfile'
9+ workflow_dispatch :
10+
11+ env :
12+ REGISTRY : ghcr.io
13+ IMAGE_NAME : ${{ github.repository }}/keycloak-masterclass-vscode
14+
15+ jobs :
16+ build-and-push :
17+ runs-on : ubuntu-latest
18+ permissions :
19+ contents : read
20+ packages : write
21+
22+ steps :
23+ - name : Checkout repository
24+ uses : actions/checkout@v4
25+
26+ - name : Log in to the Container registry
27+ uses : docker/login-action@v3
28+ with :
29+ registry : ${{ env.REGISTRY }}
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Extract metadata (tags, labels)
34+ id : meta
35+ uses : docker/metadata-action@v5
36+ with :
37+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+ tags : |
39+ type=raw,value=latest
40+ type=sha
41+
42+ - name : Build and push Docker image
43+ uses : docker/build-push-action@v5
44+ with :
45+ # Der Pfad zum Ordner, in dem das Dockerfile liegt
46+ context : keycloak/masterclass/vscode/
47+ # Der Pfad zum Dockerfile selbst
48+ file : keycloak/masterclass/vscode/Dockerfile
49+ push : true
50+ tags : ${{ steps.meta.outputs.tags }}
51+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments