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