model: Switching from multi-source to single-source #126
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: Build and push images | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build_push: | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: quay.io | |
# Set tag to the last commit sha on main branch, otherwise tag will be the branch name | |
REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && github.sha || (github.head_ref||github.ref_name) }} | |
REGISTRY_ORG: kubev2v | |
steps: | |
- name: Checkout forklift | |
uses: actions/checkout@v4 | |
- name: Login to quay.io with bot account | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Build and push images to quay.io | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
make build-containers REGISTRY_TAG=latest | |
make build-containers REGISTRY_TAG=$REGISTRY_TAG LABEL="quay.expires-after=10d" | |
make push-containers REGISTRY_TAG=latest | |
make push-containers REGISTRY_TAG=$REGISTRY_TAG LABEL="quay.expires-after=10d" |