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"
2+
3+ on :
4+ push :
5+ branches :
6+ - ' main'
7+ tags :
8+ - ' v*'
9+
10+ env :
11+ # Use docker.io for Docker Hub if empty
12+ REGISTRY : ghcr.io
13+ # GitHub repository as <account>/<repo>
14+ IMAGE_NAME : ${{ github.repository }}
15+
16+ jobs :
17+ docker :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v3
22+
23+ - name : Login to ${{ env.REGISTRY }}
24+ uses : docker/login-action@v3
25+ with :
26+ registry : ${{ env.REGISTRY }}
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Set up QEMU
31+ uses : docker/setup-qemu-action@v3
32+
33+ - name : Set up Docker Buildx
34+ uses : docker/setup-buildx-action@v3
35+
36+ - name : Extract Docker metadata
37+ id : meta
38+ uses : docker/metadata-action@v5
39+ with :
40+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41+ tags : |
42+ type=sha,format=long
43+ type=semver,pattern={{version}}
44+ type=semver,pattern={{major}}.{{minor}}
45+ flavor : |
46+ latest=false
47+
48+ - name : Build and push
49+ uses : docker/build-push-action@v6
50+ with :
51+ context : .
52+ push : true
53+ tags : ${{ steps.meta.outputs.tags }}
54+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ COPY ./pyproject.toml ./poetry.lock /code/
2323RUN poetry install --no-interaction --no-root --only=main
2424
2525ARG BUILD_COMMIT_SHA
26- ENV BUILD_COMMIT_SHA ${BUILD_COMMIT_SHA:-}
26+ ENV BUILD_COMMIT_SHA= ${BUILD_COMMIT_SHA:-}
2727
2828# RUN if [ "${BUILD_COMMIT_SHA}" = "localdev" ]; then \
2929# poetry install --no-interaction --no-root --only=dev; \
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ services:
1717 # ]
1818 environment :
1919 - AUTHENTIK_TOKEN
20+ - API_KEY
You can’t perform that action at this time.
0 commit comments