Skip to content

Handle exceptions when capturing images #3

Handle exceptions when capturing images

Handle exceptions when capturing images #3

Workflow file for this run

name: Container Processing
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get tag
id: get_tag
run: |
echo "::set-output name=IMAGE_TAG::$(echo $GITHUB_REF | cut -d / -f 3)"
- name: Set up qemu
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to Docker Hub
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login --username "${{ vars.DOCKER_USERNAME }}" --password-stdin
- name: Get changes
id: identify
uses: jitterbit/get-changed-files@v1
- run: |
echo ${{ steps.files.output.all }}
- name: Build image
env:
GITHUB_REPOSITORY: ${{ github.repository }}
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
DOCKER_FOLDER: "axis-ptz-controller"
DOCKER_NAMESPACE: ${{ vars.DOCKER_NAMESPACE }}
TAG_NAME: ${{ steps.get_tag.outputs.IMAGE_TAG }}
run: |
GITHUB_REPO=$(basename $GITHUB_REPOSITORY)
docker buildx build $DOCKER_FOLDER \
--platform linux/arm64,linux/amd64 \
--push \
--tag $DOCKER_NAMESPACE/$GITHUB_REPO:latest \
--tag $DOCKER_NAMESPACE/$GITHUB_REPO:$TAG_NAME