Skip to content

Merge pull request #13 from hunter-io/3.3.0 #39

Merge pull request #13 from hunter-io/3.3.0

Merge pull request #13 from hunter-io/3.3.0 #39

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@v2
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- 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: ghcr.io/hunter-io/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: ghcr.io/hunter-io/baseimage-ruby:latest