forked from rook/rook
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 4.2.0 to 4.2.1. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/f24d7193d98baebaeacc7e2227925dd47cc267f5...b47578312673ae6fa5b5096b330d9fbac3d116df) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-version: 4.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
97 lines
3.0 KiB
YAML
97 lines
3.0 KiB
YAML
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
|
|
packages: write
|
|
|
|
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@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
# 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@29109295f81e9208d7d86ff1c6c12d2833863392 # 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: Login to Quay.io
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
|
|
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
|
|
|
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
with:
|
|
python-version: 3.13
|
|
|
|
- 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 "cncf-rook-info@lists.cncf.io"
|
|
|
|
- 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
|