Skip to content

Merge pull request #5 from FaHeymann/trust-mounted-git-folders #7

Merge pull request #5 from FaHeymann/trust-mounted-git-folders

Merge pull request #5 from FaHeymann/trust-mounted-git-folders #7

Workflow file for this run

name: build-push
on:
workflow_dispatch:
push:
branches:
- '*'
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: test
run: make docker-test
- name: build
run: make docker-image
- name: Log in to GHCR
run: |
echo "${{ github.token }}" | docker login https://ghcr.io -u ${GITHUB_ACTOR} --password-stdin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: publish-latest
run: |
docker tag ${{ github.repository }}:latest ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:latest
if: github.ref == 'refs/heads/master'
- name: publish-branch
run: |
docker tag ${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${GITHUB_REF##*/}
docker push ghcr.io/${{ github.repository }}:${GITHUB_REF##*/}
if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/master'
- name: publish-tag
run: |
docker tag ${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${GITHUB_REF##*/}
docker push ghcr.io/${{ github.repository }}:${GITHUB_REF##*/}
if: startsWith(github.ref, 'refs/tags/v')