switch to actions v2 format

This commit is contained in:
meeb 2021-05-27 20:26:11 +10:00
parent 5ced901ae8
commit ed0c2d7dd3
1 changed files with 14 additions and 7 deletions

View File

@ -35,12 +35,19 @@ jobs:
containerise: containerise:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log into GitHub Container Registry - name: Log into GitHub Container Registry
run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build the container image - name: Build and push
run: | uses: docker/build-push-action@v2
LATEST_TAG=ghcr.io/meeb/$IMAGE_NAME:latest with:
docker buildx create --name builder context: .
docker buildx use builder file: ./Dockerfile
docker buildx build --platform linux/amd64 --tag $IMAGE_NAME --push . platforms: linux/amd64
push: true
tags: ghcr.io/meeb/$IMAGE_NAME:latest
cache-from: type=registry,ref=ghcr.io/meeb/$IMAGE_NAME:latest
cache-to: type=inline