Skip to content

Add infrastructureascode.ch branding, update dependencies #18

Add infrastructureascode.ch branding, update dependencies

Add infrastructureascode.ch branding, update dependencies #18

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ master ]
tags: ['*']
jobs:
build:
environment: docker-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set tag for docker image
run: |
if [[ "${GITHUB_REF_NAME}" == "master" ]] || [[ "${GITHUB_REF_NAME}" == "main" ]] ; then
tag_name=latest
else
tag_name=${GITHUB_REF_NAME}
fi
echo "tag_name=${tag_name}" >> $GITHUB_ENV
- name: Echo tag
run: echo ${{ env.tag_name }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/jinja101:${{ env.tag_name }}
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/jinja101:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/jinja101:buildcache,mode=max