v0.1.2 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build and Push | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build-and-push: | |
name: Build and Push GKE Info Go | |
runs-on: ubuntu-latest | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
steps: | |
# Checkout | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Docker Buildx | |
# https://github.com/marketplace/actions/docker-setup-buildx | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
# Docker Login | |
# https://github.com/marketplace/actions/docker-login | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Build and Push Docker to GitHub Container Registry | |
# https://github.com/marketplace/actions/build-and-push-docker-images | |
- name: Build and Push GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
tags: | | |
ghcr.io/osinfra-io/gke-info-go:${{ env.VERSION }} | |
ghcr.io/osinfra-io/gke-info-go:latest | |
cache-from: type=registry,ref=ghcr.io/osinfra-io/gke-info-go:latest | |
cache-to: type=inline | |
push: true |