Skip to content

Beta docker on dev branch #38

Beta docker on dev branch

Beta docker on dev branch #38

name: Beta docker on dev branch
on:
push:
# Sequence of patterns matched against refs/heads
branches-ignore:
- 'main'
paths-ignore:
- 'CODEOWNERS'
- '**.md'
- '.**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
name: Beta docker on dev branch
runs-on: ubuntu-22.04
steps:
- name: Checkout
id: checkout
# from https://github.com/actions/checkout/commits/main
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Log in to the Container registry
id: docker_login
# from https://github.com/docker/login-action/commits/master
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=raw,value=beta-${{ github.ref_name }}
labels:
org.opencontainers.image.title=${{ github.repository }}-beta
org.opencontainers.image.description=GitHub self hosted runner
org.opencontainers.image.authors=PagoPA
org.opencontainers.image.url=github.com/PagoPA/${{ github.repository }}
org.opencontainers.image.source=https://github.com/${{ github.repository }}
- name: Build and push Docker image
id: docker_build_push
# from https://github.com/docker/build-push-action/commits/master
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile.github
cache-from: type=gha
cache-to: type=gha,mode=min