File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 - name : Set up Docker Buildx
2828 uses : docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # tag=v4
2929
30- - run : |
30+ - name : Build and push images
31+ run : |
3132 docker login -u="${{ secrets.QUAY_USERNAME }}" -p="${{ secrets.QUAY_TOKEN }}" quay.io # zizmor: ignore[secrets-outside-env]
3233 # Ensure we source identical build arguments for both builds
3334 source hack/version.sh && version::get_git_vars && version::get_build_date && \
3435 make docker-buildx IMG=${{ env.image_tag_branch }} && \
35- make docker-buildx IMG=${{ env.image_tag_commit }} DOCKER_BUILD_ARGS="--annotation quay.expires-after=4w"
36+ make docker-buildx IMG=${{ env.image_tag_commit }}
37+
38+ - name : Set expiration on commit image
39+ env :
40+ QUAY_TOKEN : ${{ secrets.QUAY_TOKEN }} # zizmor: ignore[secrets-outside-env]
41+ run : |
42+ EXPIRATION=$(($(date -u +%s) + 2419200))
43+ curl -sf -X PUT \
44+ -H "Authorization: Bearer ${QUAY_TOKEN}" \
45+ -H "Content-Type: application/json" \
46+ -d "{\"expiration\": $EXPIRATION}" \
47+ "https://quay.io/api/v1/repository/orc/openstack-resource-controller/tag/commit-${GITHUB_SHA::7}"
You can’t perform that action at this time.
0 commit comments