Skip to content

fix typo in workflow (#275) #211

fix typo in workflow (#275)

fix typo in workflow (#275) #211

Workflow file for this run

name: Docker
on:
push:
tags:
- 'v*.*.*'
pull_request:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_BUILD_ARGS: ${{ vars.DOCKER_BUILD_ARGS }}
jobs:
release:
name: Release
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
docker.io/anzbank/arrai
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{raw}}
type=sha,prefix=,format=long
labels: |
org.opencontainers.image.url=https://arr.ai
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build docker container image
uses: docker/build-push-action@v3
with:
context: .
pull: true
load: true
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{ env.DOCKER_BUILD_ARGS }}
- name: Download container-structure-test
env:
CONTAINER_STRUCTURE_TEST: ${{ vars.CONTAINER_STRUCTURE_TEST || 'https://storage.googleapis.com/container-structure-test/v1.15.0/container-structure-test-linux-amd64' }}
run: |
curl -LO ${CONTAINER_STRUCTURE_TEST} && chmod +x container-structure-test-linux-amd64 && sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
- name: Test container image
env:
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
config: container-structure-tests.yaml
run: |
container-structure-test test --image $image --config $config --no-color
- name: Login to DockerHub
# only attempt to push if we are in the open source repo that has credentials, and there's been a push, not merely a pull request.
if: github.repository == 'arr-ai/arrai' && github.event_name == 'push'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Build and push docker container image
# only attempt to push if we are in the open source repo that has credentials, and there's been a push, not merely a pull request.
if: github.repository == 'arr-ai/arrai' && github.event_name == 'push'
uses: docker/build-push-action@v3
with:
context: .
pull: true
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64