1
Fork 0
mirror of https://github.com/Steffo99/distributed-arcade.git synced 2024-11-24 00:54:26 +00:00

Update git workflows

This commit is contained in:
Steffo 2023-01-09 05:30:27 +01:00
parent 6ba767655f
commit be38eb13f4
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 20 additions and 53 deletions

View file

@ -1,53 +0,0 @@
name: "Automated release"
on:
push:
tags:
- "v*"
jobs:
publish-docker:
name: "Build and publish Docker image on ghcr.io"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: "actions/checkout@v2"
- name: "Find the release semantic version"
id: "semver"
uses: "Steffo99/actions-semver@v0.3.4"
with:
string: "${{ github.ref_name }}"
- name: "Setup Buildx"
uses: "docker/setup-buildx-action@v2"
- name: "Login to GitHub Containers"
uses: "docker/login-action@v2"
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: "Find the lowercase name of the repository"
id: "reponame"
uses: "ASzc/change-string-case-action@v2"
with:
string: "${{ github.repository }}"
- name: "Build and push the Docker image"
uses: "docker/build-push-action@v3"
with:
tags: >-
ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.precedence }},
ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.core }},
ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.pair }},
ghcr.io/${{ steps.reponame.outputs.lowercase }}:${{ steps.semver.outputs.major }},
ghcr.io/${{ steps.reponame.outputs.lowercase }}:latest
push: true
- name: "Create release"
uses: "ncipollo/release-action@v1.10.0"
with:
draft: true
generateReleaseNotes: true

20
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: "Release new version"
on:
# Creation of a new tag starting with v
push:
tags:
- "v*"
jobs:
ghcrio:
uses: Steffo99/.github/.github/workflows/buildrelease-docker.yml@main
needs:
- test
portainer:
uses: Steffo99/.github/.github/workflows/deploy-portainer.yml@main
needs:
- ghcrio
secrets:
PORTAINER_HOOK_URL: ${{ secrets.PORTAINER_HOOK_URL }}