CI: build container when the version is a clean git tag 1
All checks were successful
/ build (push) Successful in 21s

This commit is contained in:
phil 2024-11-03 16:06:44 +01:00
parent b77ae05fcf
commit c3cbafbae3

View file

@ -43,12 +43,10 @@ jobs:
- name: Check if the container should be built
id: builder
env:
builder: ${{ inputs.build || !contains(steps.version.output.version, '-') }}
run: echo $builder
run: echo "run=${{ inputs.build || !contains(steps.version.output.version, '-') }}" >> $GITHUB_OUTPUT
- name: Build container
if: ${{ steps.builder.builder }}
if: ${{ steps.builder.output.run }}
uses: actions/buildah-build@v1
with:
image: treetrail-frontend
@ -59,13 +57,13 @@ jobs:
./Containerfile
- name: Workaround for bug of podman-login
if: ${{ steps.builder.builder }}
if: ${{ steps.builder.output.run }}
run: |
mkdir -p $HOME/.docker
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
- name: Log in to container registry (with another workaround)
if: ${{ steps.builder.builder }}
if: ${{ steps.builder.output.run }}
uses: actions/podman-login@v1
with:
registry: ${{ vars.REGISTRY }}
@ -74,7 +72,7 @@ jobs:
auth_file_path: /tmp/auth.json
- uses: actions/push-to-registry@v2
if: ${{ steps.builder.builder }}
if: ${{ steps.builder.output.run }}
with:
registry: "docker://${{ vars.REGISTRY }}"
image: treetrail-frontend