Skip to content

no post signin anymore #6

no post signin anymore

no post signin anymore #6

Workflow file for this run

name: Docker Image CI
env:
BUILD_PLATFORM: |
linux/arm/v6
linux/arm/v7
linux/arm64
linux/amd64
DOCKER_BUILDKIT: 1
IMAGE_NAME: image
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Tag Image
id: tag_image
run: |
DOCKER_REPOSITORY=ghcr.io/${{ github.repository }}/$IMAGE_NAME
DOCKER_REPOSITORY=$(echo $DOCKER_REPOSITORY | tr '[A-Z]' '[a-z]')
DOCKER_TAG=latest
echo ::set-output name=docker_repository::${DOCKER_REPOSITORY}
echo ::set-output name=docker_tag::${DOCKER_TAG}
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build Image
uses: docker/build-push-action@v3
with:
build-args: REPO=${{ github.repository }}
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile
platforms: ${{ env.BUILD_PLATFORM }}
push: true
tags: |
${{ steps.tag_image.outputs.docker_repository }}:${{ steps.tag_image.outputs.docker_tag }}
${{ steps.tag_image.outputs.docker_repository }}:${{ github.sha }}
target: runtime-image