Skip to content

👷 Upgrade workflow actions #44

👷 Upgrade workflow actions

👷 Upgrade workflow actions #44

Workflow file for this run

name: Build cpac_templates Docker image
on:
push:
jobs:
Ubuntu:
name: Build Docker image for C-PAC
strategy:
matrix:
Dockerfile:
- Ubuntu.bionic-non-free
runs-on: ubuntu-latest
steps:
- name: Check out C-PAC_templates
uses: actions/[email protected]
with:
fetch-depth: 2
lfs: true
- run: git lfs pull
- name: Log in to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image tag
run: echo DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}:latest" | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Append branch to image tag
if: github.ref_name != 'main'
run: |
GITHUB_BRANCH=${{ github.ref_name }}
echo DOCKER_TAG=`echo "${{ env.DOCKER_TAG }}_${GITHUB_BRANCH//\//_}"` >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: .github/Dockerfiles/cpac_templates.Dockerfile
push: true
tags: |
${{ env.DOCKER_TAG }}