Skip to content

bump docker-push action to v2 #8

bump docker-push action to v2

bump docker-push action to v2 #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
jobs:
build:
env:
context: "./"
controlplane_image_name: "openshift-capi-agent-controlplane"
bootstrap_image_name: "openshift-capi-agent-bootstrap"
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get version
id: get_version
run: |
VERSION="${GITHUB_REF#refs/tags/}"
echo "Releasing ${VERSION}"
echo "VERSION=${VERSION//v}" >> $GITHUB_ENV
- name: Set tags on manifests
id: set_tag_manifests
run: |
sed -i "s,quay.io/edge-infrastructure/openshift-capi-agent-bootstrap:latest,${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}," bootstrap-components.yaml
sed -i "s,quay.io/edge-infrastructure/openshift-capi-agent-controlplane:latest,${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}," controlplane-components.yaml
- name: Build and publish bootstrap image to Quay
uses: docker/build-push-action@v2
with:
path: ${{ env.context }}
registry: ${{ secrets.REGISTRY_SERVER }}
repository: ${{ secrets.REGISTRY_NAMESPACE }}/${{ env.bootstrap_image_name }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
tags: "${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}, ${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:latest"
build-args: "bootstrap"
- name: Build and publish bootstrap image to Quay
uses: docker/build-push-action@v1
with:
path: ${{ env.context }}
registry: ${{ secrets.REGISTRY_SERVER }}
repository: ${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}
password: ${{ secrets.REGISTRY_PASSWORD }}
tags: "${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:${{env.VERSION}}, ${{ secrets.REGISTRY_SERVER }}/${{ secrets.REGISTRY_NAMESPACE }}/${{ env.controlplane_image_name }}:latest"
build-args: "controlplane"
- name: Create GitHub Release
uses: softprops/[email protected]
with:
name: 'Release ${{ env.VERSION }}'
files: |
controlplane-components.yaml
bootstrap-components.yaml
metadata.yaml
generate_release_notes: true
draft: false
prerelease: ${{ contains(env.VERSION, 'rc') }}