-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.17 KB
/
build-and-push.yaml
File metadata and controls
49 lines (42 loc) · 1.17 KB
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
name: build and push
on:
workflow_call:
inputs:
imagename:
required: true
type: string
secrets:
quay_user:
required: true
quay_password:
required: true
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: git fetch
run: |
git fetch
- name: git checkout
run: |
git checkout ${{ github.head_ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.quay_user }}
password: ${{ secrets.quay_password }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
push: true
context: images/${{ inputs.imagename }}
tags: quay.io/wikimedia-paws-prod/${{ inputs.imagename }}:pr-${{ github.event.number }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}