Skip to content

CI

CI #9

Workflow file for this run

name: ci
on:
workflow_dispatch:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: svengo/tor-test
flavor: |
latest=${{ github.event.release.prerelease == false }}
tags: |
type=match,pattern=v(.*),group=1
type=sha
-
name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name == 'release' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}