CI: build container when the version is a clean git tag 1
All checks were successful
/ build (push) Successful in 21s
All checks were successful
/ build (push) Successful in 21s
This commit is contained in:
parent
b77ae05fcf
commit
c3cbafbae3
1 changed files with 5 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue