-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.7 KB
/
Testing-package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Docker Image Testing Action for ghcr.io
on:
push:
branches-ignore:
- main
env:
IMAGE: code-liberation-front/dbarchive
DKRIMAGE: moyito2604/dbarchive
VERSION: testing
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 Testing Image
uses: docker/[email protected]
with:
platforms: linux/amd64
push: true
tags: |
ghcr.io/${{ env.IMAGE }}:${{ env.VERSION }}
${{ env.DKRIMAGE }}:${{ env.VERSION }}
cache-from: type=registry,ref=ghcr.io/${{ env.IMAGE }}:${{ env.VERSION }}
cache-to: type=inline
build-args: |
TAG=${{ env.VERSION }}
provenance: false
- 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