chore: separate layers to reduce layer size #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Image CI | |
on: | |
push: | |
tags: | |
- "*" | |
concurrency: | |
group: "docker-image" | |
cancel-in-progress: true | |
env: | |
DOCKER_BUILDKIT: "1" | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate repository name | |
run: | | |
echo "REPOSITORY_PATH=$( echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]' )" >> ${GITHUB_ENV} | |
echo "REPOSITORY_SHA=$( echo ${GITHUB_SHA} | cut -c 1-7 )" >> ${GITHUB_ENV} | |
- name: Build and Push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Anagram Risc0 development container | |
build-args: | | |
VERSION=${{ github.ref_name }} | |
tags: | | |
ghcr.io/${{ env.REPOSITORY_PATH }}:v${{ github.ref_name }} | |
ghcr.io/${{ env.REPOSITORY_PATH }}:${{ env.REPOSITORY_SHA }} | |
ghcr.io/${{ env.REPOSITORY_PATH }}:latest | |
- name: GitHub Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: false | |
prerelease: false | |
tag_name: ${{ github.ref_name }} | |
release_name: v${{ github.ref_name }} | |
body_path: CHANGELOG.md |