-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.75 KB
/
update_image.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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Update Image
on:
workflow_dispatch:
inputs:
image:
description: "Image to Update."
required: true
version:
description: "Version to deploy."
required: true
arg:
description: "Arg to overwrite."
required: true
run-name: Deploy ${{ github.event.inputs.image }} version ${{ github.event.inputs.version }}
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: |
date=$(date '+%Y-%m-%d')
echo "the date is $date"
echo "date=$date" >> $GITHUB_OUTPUT
- name: pull repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push to Quay
uses: docker/build-push-action@v3
with:
context: ./${{ github.event.inputs.image }}
file: ./${{ github.event.inputs.image }}/Dockerfile
build-args: |
${{ github.event.inputs.arg }}=${{ github.event.inputs.version }}
push: true
tags: quay.io/uphl/${{ github.event.inputs.image }}:${{ github.event.inputs.version }}-${{ steps.date.outputs.date }}
- name: Build and push to Quay
uses: docker/build-push-action@v3
with:
file: ./${{ github.event.inputs.image }}/Dockerfile
build-args: |
${{ github.event.inputs.arg }}=${{ github.event.inputs.version }}
push: true
tags: quay.io/uphl/artic:latest