Skip to content

Added error checking #14

Added error checking

Added error checking #14

name: Docker Image Action for ghcr.io
on:
push:
branches:
- main
env:
IMAGE: code-liberation-front/dbarchive
VERSION: 1.0.0
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Buildx Environment
uses: docker/[email protected]
with:
platforms: linux/amd64
- name: Log in to the Github Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PASS }}
- name: Build and Push new Stable Image
uses: docker/[email protected]
with:
platforms: linux/amd64
push: true
tags: |
ghcr.io/${{ env.IMAGE }}:${{ env.VERSION }}
ghcr.io/${{ env.IMAGE }}:latest
cache-from: type=registry,ref=ghcr.io/${{ env.IMAGE }}:latest
cache-to: type=inline
build-args: |
TAG=${{ env.VERSION }}
provenance: false
- name: Remove old Testing Container
uses: ArchieAtkinson/[email protected]
with:
tag_name: testing
github_token: ${{ secrets.GH_PASS }}
- name: Remove untagged images excepted multiplatform packages
uses: Chizkiyahu/delete-untagged-ghcr-action@v4
with:
token: ${{ secrets.GH_PASS }}
repository_owner: ${{ github.repository_owner }}
repository: ${{ github.repository }}
untagged_only: true
owner_type: user
except_untagged_multiplatform: true