Skip to content

Merge pull request #2 from C4T-BuT-S4D/pomo/new-ci #2

Merge pull request #2 from C4T-BuT-S4D/pomo/new-ci

Merge pull request #2 from C4T-BuT-S4D/pomo/new-ci #2

Workflow file for this run

name: release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- 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 }}
- id: repo_name
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository_owner }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: .
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: 'linux/amd64,linux/arm64'
tags: |
ghcr.io/${{ steps.repo_name.outputs.lowercase }}/dedcleaner:latest
ghcr.io/${{ steps.repo_name.outputs.lowercase }}/dedcleaner:${{ steps.get_version.outputs.VERSION }}