Skip to content

2024.10.1

2024.10.1 #39

name: Tools Container - Publish Tag
on:
release:
types:
- published
paths:
- "docker/**"
- ".github/**"
jobs:
publish_latest:
name: Push tagged container image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get GitHub Tag
id: get_tag
run: |
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build and push container image
uses: docker/build-push-action@v2
with:
cache-from: ghcr.io/xenitab/github-actions/tools:latest
file: docker/Dockerfile
context: docker
tags: ghcr.io/xenitab/github-actions/tools:${{ steps.get_tag.outputs.tag }}
push: true