Checks for SQL and Directories #20
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: Docker Image Action for ghcr.io | |
on: | |
push: | |
branches: | |
- main | |
env: | |
IMAGE: code-liberation-front/dbarchive | |
DKRIMAGE: moyito2604/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: Log in to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- 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 | |
${{ env.DKRIMAGE }}:${{ env.VERSION }} | |
${{ env.DKRIMAGE }}: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 |