This repository has been archived by the owner on May 21, 2024. It is now read-only.
Publish the gradetool image #300
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: 'Publish the gradetool image' | |
"on": | |
# Run the workflow when a new release gets published | |
release: | |
target_commitish: main | |
# Run the workflow every day at 5 am UTC (1 am EST, 7am CET) | |
# This is useful for keeping the image up-to-date with security | |
# patches provided in the UBI. | |
# Disclaimer: There is no guarantee that scheduled workflows will | |
# run at the predefined time, if at all. The delay is usually | |
# around 10-30 minutes. | |
schedule: | |
- cron: '0 5 * * *' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
env: | |
REGISTRY: quay.io | |
TNF_IMAGE_NAME: testnetworkfunction/gradetool | |
IMAGE_TAG: latest | |
jobs: | |
test-and-push-tnf-image-main: | |
name: 'Test and push the `gradetool` image' | |
runs-on: ubuntu-22.04 | |
env: | |
SHELL: /bin/bash | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build the `gradetool` image | |
run: | | |
make build-image-local | |
# Push the new TNF image to Quay.io. | |
- name: Authenticate against Quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
# Use a Robot Account to authenticate against Quay.io | |
# https://docs.quay.io/glossary/robot-accounts.html | |
username: ${{ secrets.QUAY_ROBOT_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Push the newly built image to Quay.io | |
run: docker push ${REGISTRY}/${TNF_IMAGE_NAME}:${IMAGE_TAG} | |