WIP #14
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: Continuous Delivery | |
# build on pushes from every branch | |
on: | |
push: | |
branches: | |
- '*' | |
# on: | |
# release: | |
# types: [ published ] | |
jobs: | |
release: | |
name: Release Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub Container Registry | |
uses: docker/#-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image for release | |
env: | |
LINUX_AMD64_RELEASE: "true" | |
run: | | |
# make release GOTENBERG_VERSION=${{ github.event.release.tag_name }} | |
# make release GOTENBERG_VERSION=${{ github.event.release.tag_name }} DOCKER_REPOSITORY=ghcr.io/fulll/gotenberg | |
make release GOTENBERG_VERSION=0.0.0-untag | |
make release GOTENBERG_VERSION=0.0.0-untag DOCKER_REPOSITORY=ghcr.io/fulll/gotenberg | |
- name: generate aws credentials config | |
env: | |
AWS_CREDENTIALS: ${{ secrets.STAGING_AWS_CREDENTIALS }} | |
aws-region: eu-central-1 | |
run: | | |
mkdir -p "${HOME}/.aws" | |
echo "${AWS_CREDENTIALS}" > "${HOME}/.aws/credentials" | |
- name: docker login and push | |
run: | | |
docker pull ghcr.io/fulll/gotenberg/gotenberg:0.0.0-untag | |
docker tag ghcr.io/fulll/gotenberg/gotenberg:0.0.0-untag 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg/gotenberg:0.0.0-untag | |
aws ecr get-login-password --region eu-central-1 | docker login --username AWS --password-stdin 285715278780.dkr.ecr.eu-central-1.amazonaws.com | |
docker push 285715278780.dkr.ecr.eu-central-1.amazonaws.com/gotenberg/gotenberg:0.0.0-untag |