dd
Some checks failed
build / build (push) Successful in 13s
linter / gitleaks (push) Successful in 2s
linter / hadolint (push) Failing after 3s

This commit is contained in:
Michael Grote 2024-08-30 17:47:35 +02:00
parent bca009d4bb
commit 4e7b23d891

View file

@ -17,18 +17,21 @@ jobs:
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get Meta
- name: Extract repository name
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
REPO_BRANCH=$(git rev-parse --abbrev-ref HEAD)
- name: Extract branch name
shell: bash
run: echo "REPO_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: "registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:latest,registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_BRANCH }}"
tags: "registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:latest,registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.extract_branch.outputs.REPO_BRANCH }}"
# depends on lint