generated from Hochfrequenz/python_template_repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Konstantin
committed
Oct 8, 2024
1 parent
9ff1b8e
commit f1be607
Showing
2 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish Docker image to Github Container Registry GHCR | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to GHCR | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
# with: # we don't need this | ||
# submodules: "recursive" | ||
- name: get version tag | ||
run: | | ||
VERSION=$(echo ${GITHUB_REF#refs/tags/}) | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Log in to GHCR | ||
# the token has repo:write and package scope and expires on 2025-10-08 | ||
# https://github.com/Hochfrequenz/ebd_toolchain/settings/secrets/actions/GHCR_PUSH_TOKEN | ||
run: echo "${{ secrets.GHCR_PUSH_TOKEN }}" | docker login ghcr.io -u hf-kklein --password-stdin | ||
|
||
- name: Build and push | ||
run: | | ||
docker build -t ebd_toolchain:$VERSION . | ||
docker tag ahbicht-functions:$VERSION ghcr.io/hochfrequenz/ebd_toolchain:$VERSION | ||
docker push ghcr.io/hochfrequenz/ebd_toolchain:$VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters