-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (40 loc) · 1.18 KB
/
image-publish.yml
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
name: Image Publish
on:
workflow_dispatch:
inputs:
sourceImg:
description: 'The source image, e.g. argoproj/argocd:v2.1.1'
required: true
targetImg:
description: 'The target image, e.g. akuity/argocd:v0.0.1'
required: true
defaults:
run:
shell: bash
jobs:
build-linux-amd64:
name: Build & push linux/amd64
runs-on: ubuntu-20.04
strategy:
matrix:
platform: [ linux/amd64 ]
target: [ argocd ]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
- name: Docker Push
env:
DOCKERIO_ORG: "quay.io"
run: |
SOURCE_IMG=${{ github.event.inputs.sourceImg }}
TARGET_IMG=${{ github.event.inputs.targetImg }}
docker pull ${DOCKERIO_ORG}/${SOURCE_IMG}
docker tag ${DOCKERIO_ORG}/${SOURCE_IMG} ${DOCKERIO_ORG}/${TARGET_IMG}
docker push ${DOCKERIO_ORG}/${TARGET_IMG}