Merge pull request #15038 from cobaltcore-dev/zone-shared-pools-fix #7
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 Build | |
on: | |
push: | |
branches: | |
- master | |
- release-* | |
tags: | |
- v* | |
defaults: | |
run: | |
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell | |
shell: bash --noprofile --norc -eo pipefail -x {0} | |
permissions: | |
contents: read | |
jobs: | |
push-image-to-container-registry: | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'rook/rook' | |
steps: | |
- name: checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: "1.22" | |
# docker/setup-qemu action installs QEMU static binaries, which are used to run builders for architectures other than the host. | |
- name: set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # master | |
with: | |
platforms: all | |
- name: log in to container registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_USR }} | |
aws-secret-access-key: ${{ secrets.AWS_PSW }} | |
aws-region: us-east-1 | |
# creating custom env var | |
- name: set env | |
run: | | |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
echo "GITHUB_REF"=${GITHUB_REF} >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel | |
sudo apt-get -q update | |
sudo apt-get -q install -y python3-pygit2 | |
- name: Configure git user | |
run: | | |
# Use our Rook "service account" | |
git config user.name Rook | |
git config user.email "[email protected]" | |
- name: build and release | |
env: | |
GIT_API_TOKEN: ${{ secrets.GIT_API_TOKEN }} | |
BRANCH_NAME: ${{ env.BRANCH_NAME }} | |
AWS_USR: ${{ secrets.AWS_USR }} | |
AWS_PSW: ${{ secrets.AWS_PSW }} | |
GITHUB_REF: $ {{ env.GITHUB_REF }} | |
run: | | |
tests/scripts/build-release.sh |