-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate out the manual vs scheduled update actions
Signed-off-by: Ralph Castain <[email protected]>
- Loading branch information
Showing
2 changed files
with
70 additions
and
1 deletion.
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,69 @@ | ||
name: Refresh Cross Version Testing Container Image | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: docker.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: jjhursey/pmix-xver-tester | ||
|
||
jobs: | ||
build: | ||
# Do not run on fork's of this repo | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif | ||
if: github.repository == 'openpmix/pmix-tests' | ||
runs-on: ubuntu-latest | ||
environment: Docker Registry Auth | ||
|
||
steps: | ||
# Update the built timestamp to force refresh | ||
- name: Get current date | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%Y-%m-%d at %H:%M %Z')" | ||
|
||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# QEMU to allow us to build for different architectures | ||
# https://github.com/docker/setup-qemu-action | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
# Allows us to build and push multi-arch containers | ||
# https://github.com/docker/setup-buildx-action | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
# Login against a container registry | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
# Build and push Docker image with Buildx | ||
# https://github.com/docker/build-push-action | ||
# Note: I'm not sure why $GITHUB_WORKSPACE is not being resolved properly | ||
# here in the mean time just use the full path. | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: /home/runner/work/pmix-tests/pmix-tests/crossversion/support/ | ||
# Other platforms can be added in a comma separated list. | ||
# See the QEMU link above for supported architectures | ||
# Note that non-amd64 will take a long time due to QEMU virtualization | ||
# but they do seem to run in parallel. | ||
#platforms: linux/amd64,linux/ppc64le | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ env.IMAGE_NAME }}:latest | ||
build-args: BUILD_TIMESTAMP='${{ steps.date.outputs.date }}' | ||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:latest | ||
cache-to: type=inline |
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