release #655
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: release | |
on: | |
release: | |
types: | |
- published | |
schedule: | |
- cron: '45 5 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
build_cmd: | |
- ./build-latest.sh | |
- PRERELEASE=true ./build-latest.sh | |
- ./build.sh main | |
platform: | |
- linux/amd64,linux/arm64 | |
fail-fast: false | |
runs-on: ubuntu-latest | |
name: Build new Peering Manager Docker images | |
env: | |
GH_ACTION: enable | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
IMAGE_NAMES: docker.io/peeringmanager/peering-manager ghcr.io/peering-manager/peering-manager | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get version of Peering Manager Docker | |
run: echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT" | |
shell: bash | |
- name: Check if the build is needed for '${{ matrix.build_cmd }}' | |
id: check-build-needed | |
env: | |
CHECK_ONLY: "true" | |
run: ${{ matrix.build_cmd }} | |
- name: Set up Docker Buildx | |
id: buildx-setup | |
uses: docker/setup-buildx-action@v3 | |
if: steps.check-build-needed.outputs.skipped != 'true' | |
# docker.io | |
- name: Login to docker.io | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
if: steps.check-build-needed.outputs.skipped != 'true' | |
# ghcr.io | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
if: steps.check-build-needed.outputs.skipped != 'true' | |
- name: Push the image | |
run: ${{ matrix.build_cmd }} --push | |
if: steps.check-build-needed.outputs.skipped != 'true' | |
env: | |
BUILDX_PLATFORM: ${{ matrix.platform }} | |
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }} |