This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
Bump docker/build-push-action from 5 to 6 #370
Workflow file for this run
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
# Generated by: tyk-ci/wf-gen | |
# Generated on: Thu Sep 23 14:04:36 UTC 2021 | |
# Generation commands: | |
# ./pr.zsh -repos tyk-sync -title releng: latest releng -branch releng/updates | |
# m4 -E -DxREPO=tyk-sync | |
# Distribution channels covered by this workflow | |
# - Ubuntu and Debian | |
# - RHEL/OL | |
# - tarballs | |
# - docker hub | |
# - devenv ECR | |
# - AWS mktplace | |
# - Cloudsmith | |
name: Release | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- release-** | |
tags: | |
- 'v*' | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
container: tykio/golang-cross:1.21-bullseye | |
env: | |
debvers: 'ubuntu/bionic ubuntu/focal ubuntu/jammy debian/bullseye debian/bookworm' | |
rpmvers: 'el/8 el/9 amazon/2023' | |
outputs: | |
tag: ${{ steps.targets.outputs.tag }} | |
steps: | |
- name: Checkout of tyk-sync | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set git dafe.directory | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
if: startsWith(github.ref, 'refs/tags') | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to Cloudsmith | |
if: startsWith(github.ref, 'refs/tags') | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.tyk.io | |
username: ${{ secrets.CLOUDSMITH_USERNAME }} | |
password: ${{ secrets.CLOUDSMITH_API_KEY }} | |
- name: Unlock agent and set targets | |
id: targets | |
shell: bash | |
env: | |
NFPM_STD_PASSPHRASE: ${{ secrets.SIGNING_KEY_PASSPHRASE }} | |
GPG_FINGERPRINT: 12B5D62C28F57592D1575BD51ED14C59E37DAC20 | |
PKG_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
run: | | |
ci/bin/unlock-agent.sh | |
- uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --clean -f ci/goreleaser.yml ${{ !startsWith(github.ref, 'refs/tags/') && ' --snapshot' || '' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NFPM_STD_PASSPHRASE: ${{ secrets.SIGNING_KEY_PASSPHRASE }} | |
NFPM_PAYG_PASSPHRASE: ${{ secrets.SIGNING_KEY_PASSPHRASE }} | |
GPG_FINGERPRINT: 12B5D62C28F57592D1575BD51ED14C59E37DAC20 | |
PKG_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
RPMVERS: ${{ env.rpmvers }} | |
DEBVERS: ${{ env.debvers }} | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: deb | |
retention-days: 1 | |
path: | | |
dist/*.deb | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rpm | |
retention-days: 1 | |
path: | | |
dist/*.rpm | |
upgrade-deb: | |
runs-on: ubuntu-latest | |
needs: goreleaser | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- amd64 | |
- arm64 | |
distro: | |
- ubuntu:bionic | |
- ubuntu:focal | |
- ubuntu:jammy | |
- debian:bullseye | |
- debian:bookworm | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: deb | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: generate dockerfile | |
run: | | |
echo 'FROM ${{ matrix.distro }} | |
ARG TARGETARCH | |
COPY tyk-sync*_${TARGETARCH}.deb /tyk-sync.deb | |
RUN apt-get update && apt-get install -y curl | |
RUN curl -fsSL https://packagecloud.io/install/repositories/tyk/tyk-sync/script.deb.sh | bash && apt-get install -y tyk-sync=1.2.0 | |
RUN dpkg -i /tyk-sync.deb' > Dockerfile | |
- name: install on ${{ matrix.distro }} | |
uses: docker/build-push-action@v6 | |
with: | |
context: "." | |
platforms: linux/${{ matrix.arch }} | |
file: Dockerfile | |
push: false | |
upgrade-rpm: | |
needs: goreleaser | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: | |
- amazonlinux:2023 | |
- registry.access.redhat.com/ubi8/ubi | |
- registry.access.redhat.com/ubi9/ubi | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: rpm | |
- uses: docker/setup-buildx-action@v3 | |
- name: generate dockerfile | |
run: | | |
echo 'FROM ${{ matrix.distro }} | |
COPY tyk-sync*.x86_64.rpm /tyk-sync.rpm | |
RUN yum install --allowerasing -y curl | |
RUN curl -s https://packagecloud.io/install/repositories/tyk/tyk-sync/script.rpm.sh | bash && yum install -y tyk-sync-1.2.0-1 | |
RUN curl https://keyserver.tyk.io/tyk.io.rpm.signing.key.2020 -o tyk-sync.key && rpm --import tyk-sync.key | |
RUN rpm --checksig tyk-sync.rpm | |
RUN rpm -Uvh --force tyk-sync.rpm' > Dockerfile | |
- name: install on ${{ matrix.distro }} | |
uses: docker/build-push-action@v6 | |
with: | |
context: "." | |
file: Dockerfile | |
push: false | |