-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b72dbf8
commit c90b8de
Showing
2 changed files
with
134 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: ACT Build Init | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set image tag for release | ||
if: github.event_name == 'release' | ||
run: | | ||
echo "IMAGE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Set image tag for main | ||
if: github.ref == 'refs/heads/main' && github.event_name != 'release' | ||
run: | | ||
echo "IMAGE_TAG=main_latest" >> $GITHUB_ENV | ||
- name: Set image tag and expiration for dev | ||
if: github.ref != 'refs/heads/main' && github.event_name != 'release' | ||
run: | | ||
export commit_hash=${{ github.sha }} | ||
echo "IMAGE_TAG=${GITHUB_REF##*/}_${commit_hash:0:7}" >> $GITHUB_ENV | ||
echo "QUAY_IMG_EXP=90d" >> $GITHUB_ENV | ||
- name: Checkout this project | ||
uses: actions/checkout@v4 | ||
|
||
- name: arcaflow-container-toolkit-action | ||
uses: arcalot/[email protected] | ||
with: | ||
image_name: ${{ inputs.image_name }} | ||
image_tag: ${{ inputs.image_tag }} | ||
github_username: ${{ inputs.github_username }} | ||
github_password: ${{ secrets.GITHUB_TOKEN }} | ||
github_namespace: ${{ inputs.github_namespace }} | ||
quay_username: ${{ secrets.QUAY_USERNAME }} | ||
quay_password: ${{ secrets.QUAY_PASSWORD }} | ||
quay_namespace: ${{ secrets.QUAY_NAMESPACE }} | ||
quay_custom_namespace: ${{ inputs.quay_custom_namespace }} | ||
quay_img_exp: ${{ inputs.quay_img_exp }} | ||
build_timeout: ${{ inputs.build_timeout }} | ||
archetype: ${{ inputs.archetype }} | ||
req_check_only: ${{ inputs.multi_arch }} | ||
|
||
- name: Install qemu dependency | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y qemu-user-static | ||
- name: Log in to quay.io for multi-arch | ||
if: ${{ inputs.multi_arch }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,32 +35,67 @@ on: | |
required: false | ||
|
||
jobs: | ||
act-build: | ||
name: Build ${{ github.ref_name }} from ${{ github.event_name }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set image tag for release | ||
if: github.event_name == 'release' | ||
run: | | ||
echo "IMAGE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
# act-init: | ||
# name: Init ${{ github.ref_name }} from ${{ github.event_name }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Set image tag for release | ||
# if: github.event_name == 'release' | ||
# run: | | ||
# echo "IMAGE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: Set image tag for main | ||
if: github.ref == 'refs/heads/main' && github.event_name != 'release' | ||
run: | | ||
echo "IMAGE_TAG=main_latest" >> $GITHUB_ENV | ||
# - name: Set image tag for main | ||
# if: github.ref == 'refs/heads/main' && github.event_name != 'release' | ||
# run: | | ||
# echo "IMAGE_TAG=main_latest" >> $GITHUB_ENV | ||
|
||
- name: Set image tag and expiration for dev | ||
if: github.ref != 'refs/heads/main' && github.event_name != 'release' | ||
run: | | ||
export commit_hash=${{ github.sha }} | ||
echo "IMAGE_TAG=${GITHUB_REF##*/}_${commit_hash:0:7}" >> $GITHUB_ENV | ||
echo "QUAY_IMG_EXP=90d" >> $GITHUB_ENV | ||
# - name: Set image tag and expiration for dev | ||
# if: github.ref != 'refs/heads/main' && github.event_name != 'release' | ||
# run: | | ||
# export commit_hash=${{ github.sha }} | ||
# echo "IMAGE_TAG=${GITHUB_REF##*/}_${commit_hash:0:7}" >> $GITHUB_ENV | ||
# echo "QUAY_IMG_EXP=90d" >> $GITHUB_ENV | ||
|
||
- name: Checkout this project | ||
uses: actions/checkout@v4 | ||
# - name: Checkout this project | ||
# uses: actions/checkout@v4 | ||
|
||
- name: arcaflow-container-toolkit-action | ||
uses: arcalot/[email protected] | ||
# - name: arcaflow-container-toolkit-action | ||
# uses: arcalot/[email protected] | ||
# with: | ||
# image_name: ${{ inputs.image_name }} | ||
# image_tag: ${{ inputs.image_tag }} | ||
# github_username: ${{ inputs.github_username }} | ||
# github_password: ${{ secrets.GITHUB_TOKEN }} | ||
# github_namespace: ${{ inputs.github_namespace }} | ||
# quay_username: ${{ secrets.QUAY_USERNAME }} | ||
# quay_password: ${{ secrets.QUAY_PASSWORD }} | ||
# quay_namespace: ${{ secrets.QUAY_NAMESPACE }} | ||
# quay_custom_namespace: ${{ inputs.quay_custom_namespace }} | ||
# quay_img_exp: ${{ inputs.quay_img_exp }} | ||
# build_timeout: ${{ inputs.build_timeout }} | ||
# archetype: ${{ inputs.archetype }} | ||
# req_check_only: ${{ inputs.multi_arch }} | ||
|
||
# - name: Install qemu dependency | ||
# run: | | ||
# sudo apt-get update | ||
# sudo apt-get install -y qemu-user-static | ||
|
||
# - name: Log in to quay.io for multi-arch | ||
# if: ${{ inputs.multi_arch }} | ||
# uses: redhat-actions/podman-login@v1 | ||
# with: | ||
# registry: quay.io | ||
# username: ${{ secrets.QUAY_USERNAME }} | ||
# password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
act-build-release: | ||
name: Build ${{ github.ref_name }} from ${{ github.event_name }} | ||
if: github.event_name == 'release' && inputs.multi_arch == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Initialize ACT | ||
uses: ./.github/actions/act_init.yaml | ||
with: | ||
image_name: ${{ inputs.image_name }} | ||
image_tag: ${{ inputs.image_tag }} | ||
|
@@ -75,17 +110,6 @@ jobs: | |
build_timeout: ${{ inputs.build_timeout }} | ||
archetype: ${{ inputs.archetype }} | ||
req_check_only: ${{ inputs.multi_arch }} | ||
|
||
- name: Install qemu dependency | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y qemu-user-static | ||
- name: Log in to quay.io for multi-arch | ||
if: ${{ inputs.multi_arch }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
|
@@ -113,6 +137,30 @@ jobs: | |
- name: Print release image url | ||
if: github.event_name == 'release' && inputs.multi_arch == true | ||
run: echo "Image pushed to ${{ steps.push-release-to-quay.outputs.registry-paths }}" | ||
|
||
act-build-dev: | ||
name: Build ${{ github.ref_name }} from ${{ github.event_name }} | ||
if: github.event_name == 'release' && inputs.multi_arch == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Initialize ACT | ||
uses: ./.github/actions/act_init.yaml | ||
with: | ||
image_name: ${{ inputs.image_name }} | ||
image_tag: ${{ inputs.image_tag }} | ||
github_username: ${{ inputs.github_username }} | ||
github_password: ${{ secrets.GITHUB_TOKEN }} | ||
github_namespace: ${{ inputs.github_namespace }} | ||
quay_username: ${{ secrets.QUAY_USERNAME }} | ||
quay_password: ${{ secrets.QUAY_PASSWORD }} | ||
quay_namespace: ${{ secrets.QUAY_NAMESPACE }} | ||
quay_custom_namespace: ${{ inputs.quay_custom_namespace }} | ||
quay_img_exp: ${{ inputs.quay_img_exp }} | ||
build_timeout: ${{ inputs.build_timeout }} | ||
archetype: ${{ inputs.archetype }} | ||
req_check_only: ${{ inputs.multi_arch }} | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: Build multi-arch image for dev | ||
id: build-multi-arch-dev | ||
|