Skip to content

Release Images

Release Images #8

Workflow file for this run

name: Release Images
on:
workflow_dispatch:
inputs:
version:
description: "Version"
required: true
jobs:
create-tag:
runs-on: ubuntu-latest
outputs:
tagname: ${{ inputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: rickstaa/action-create-tag@v1
id: create-tag
with:
tag: ${{ inputs.version }}
build-image:
runs-on: ubuntu-latest
needs: create-tag
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push images
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository_owner }}/nextgba:${{ needs.create-tag.outputs.tagname }},ghcr.io/${{ github.repository_owner }}/nextgba:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/nextgba:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/nextgba:buildcache,mode=max
publish-release:
runs-on: ubuntu-latest
needs: [create-tag, build-image]
outputs:
id: ${{ steps.create_release.outputs.id }}
steps:
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
**${{ needs.create-tag.outputs.tagname }}**
tag_name: ${{ needs.create-tag.outputs.tagname }}
name: ${{ needs.create-tag.outputs.tagname }}
draft: false
prerelease: true