Skip to content

Commit

Permalink
actually committing content
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Dec 17, 2024
1 parent 5124539 commit eadfee5
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+' # Exclude pre-releases
branches:
- main

jobs:
docker:
runs-on: ubuntu-latest
env:
USER: sdss
APP: zora
steps:
- name: Set docker tags
id: set-tags
run: |
echo TAG_LATEST=$USER/$APP:latest >> $GITHUB_OUTPUT
if [[ $GITHUB_REF == refs/heads/main ]]
then
echo TAGS=$USER/$APP:latest >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/heads/* ]]
then
BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's/[\/]/_/g')
echo TAGS=$USER/$APP:$BRANCH >> $GITHUB_OUTPUT
else
echo TAGS=$USER/$APP:${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
fi
- name: Show tags
run: echo ${{ steps.set-tags.outputs.TAGS }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/${{ steps.set-tags.outputs.TAGS }}
ghcr.io/${{ steps.set-tags.outputs.TAG_LATEST }}
file: ./Dockerfile
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit eadfee5

Please sign in to comment.