Recreate OCT image #2041
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: Recreate OCT image | |
on: | |
# Triggers the workflow every 6 hours | |
schedule: | |
- cron: "0 */6 * * *" | |
workflow_dispatch: | |
jobs: | |
recreate-oct-container-image: | |
name: Create new OCT container image | |
runs-on: ubuntu-20.04 | |
env: | |
SHELL: /bin/bash | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
token: ${{ secrets.PULL_TOKEN }} | |
- name: Build OCT container image | |
run: docker build -t quay.io/testnetworkfunction/oct:latest --build-arg TOKEN=${{ secrets.PULL_TOKEN }} --no-cache . | |
- name: Authenticate against Quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
# Use a Robot Account to authenticate against Quay.io | |
# https://docs.quay.io/glossary/robot-accounts.html | |
username: ${{ secrets.QUAY_ROBOT_USER }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Push the newly built image to Quay.io | |
run: docker push quay.io/testnetworkfunction/oct:latest |