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:
runs-on: ubuntu-latest
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
run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build the container image
run: |
LATEST_TAG=ghcr.io/meeb/$IMAGE_NAME:latest
docker buildx create --name builder
docker buildx use builder
docker buildx build --platform linux/amd64 --tag $IMAGE_NAME --push .
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
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