Skip to content

Commit 8947677

Browse files
committed
Add GHA Docker build
1 parent 358c346 commit 8947677

File tree

4 files changed

+30
-164
lines changed

4 files changed

+30
-164
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/ghcr.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# based on https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
2+
name: GHCR push
3+
env:
4+
IMAGE_NAME: traefik-forward-auth
5+
on:
6+
push:
7+
tags:
8+
- v*
9+
jobs:
10+
push:
11+
runs-on: ubuntu-24.04-arm
12+
permissions:
13+
packages: write
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Build image
18+
run: docker build . --file Dockerfile.arm64 --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
19+
- name: Log in to registry
20+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
21+
- name: Push image
22+
run: |
23+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
24+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
25+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
26+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
27+
echo IMAGE_ID=$IMAGE_ID
28+
echo VERSION=$VERSION
29+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
30+
docker push $IMAGE_ID:$VERSION

.github/workflows/release.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)