Skip to content

Merge pull request #23 from hunter-io/3.4.3 #60

Merge pull request #23 from hunter-io/3.4.3

Merge pull request #23 from hunter-io/3.4.3 #60

Workflow file for this run

name: Create and publish the Ruby base image
on: push
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Configure Docker to use Google Artifact Registry
run: gcloud auth configure-docker europe-west1-docker.pkg.dev
- name: Extract branch name
id: extract_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- if: github.ref != 'refs/heads/main'
name: Build and push tagged version
uses: docker/build-push-action@v2
with:
push: true
tags: europe-west1-docker.pkg.dev/hunter-io/hunter/baseimage-ruby:${{ steps.extract_branch_name.outputs.branch }}
- if: github.ref == 'refs/heads/main'
name: Build and push latest
uses: docker/build-push-action@v2
with:
push: true
tags: europe-west1-docker.pkg.dev/hunter-io/hunter/baseimage-ruby:latest