-
Notifications
You must be signed in to change notification settings - Fork 41
34 lines (28 loc) · 1.01 KB
/
container_image.yaml
File metadata and controls
34 lines (28 loc) · 1.01 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
name: container image
on:
push:
branches:
- main
permissions:
contents: read
env:
image_tag_branch: quay.io/orc/openstack-resource-controller:branch-${GITHUB_REF_NAME}
image_tag_commit: quay.io/orc/openstack-resource-controller:commit-${GITHUB_SHA::7}
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Required for git describe to generate correct output for populating
# build variables
fetch-depth: 0
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: |
docker login -u="${{ secrets.QUAY_USERNAME }}" -p="${{ secrets.QUAY_TOKEN }}" quay.io
# Ensure we source identical build arguments for both builds
source hack/version.sh && version::get_git_vars && version::get_build_date && \
make docker-buildx IMG=${{ env.image_tag_branch }} && \
make docker-buildx IMG=${{ env.image_tag_commit }} DOCKER_BUILD_ARGS="--label quay.expires-after=4w"