Merge pull request #8 from RedHatInsights/dependabot/go_modules/googl… #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Image | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
# make sure tests run first and only publish when they succeed | |
run-tests: | |
uses: ./.github/workflows/build-test.yml | |
publish-to-quay: | |
needs: run-tests | |
if: github.repository == 'RedHatInsights/insights-rebac' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set short git commit SHA | |
id: calc-short-sha | |
run: | | |
calculatedSha=$(git rev-parse --short=7 ${{ github.sha }}) | |
echo "SHORT_SHA=$calculatedSha" >> "$GITHUB_OUTPUT" | |
- name: Confirm git commit SHA output | |
run: echo ${{ steps.calc-short-sha.outputs.SHORT_SHA }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Quay | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
quay.io/ciam_authz/insights-rebac:latest, | |
quay.io/ciam_authz/insights-rebac:gh-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.calc-short-sha.outputs.SHORT_SHA }} |