v3.5.0 #47
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: Release new version | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v3 | |
- name: Parse tag | |
id: parse_tag | |
run: "echo \"version=$(echo ${{ github.ref }} | sed 's#^refs/tags/v##')\" >> $GITHUB_OUTPUT" | |
- name: Create release draft | |
id: create_release | |
uses: release-drafter/release-drafter@v5 | |
with: | |
name: v${{ steps.parse_tag.outputs.version }} | |
tag: v${{ steps.parse_tag.outputs.version }} | |
version: v${{ steps.parse_tag.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build new images | |
run: | | |
docker build . --file Dockerfile.bot -t ghcr.io/tibo-ulens/freud_bot:${{ steps.parse_tag.outputs.version }} | |
docker build . --file Dockerfile.webconfig -t ghcr.io/tibo-ulens/freud_bot_webconfig:${{ steps.parse_tag.outputs.version }} | |
- name: Log in to ghcr | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
- name: Tag new images as latest | |
run: | | |
docker tag ghcr.io/tibo-ulens/freud_bot:${{ steps.parse_tag.outputs.version }} ghcr.io/tibo-ulens/freud_bot:latest | |
docker tag ghcr.io/tibo-ulens/freud_bot_webconfig:${{ steps.parse_tag.outputs.version }} ghcr.io/tibo-ulens/freud_bot_webconfig:latest | |
- name: Push new images | |
run: | | |
docker push --all-tags ghcr.io/tibo-ulens/freud_bot | |
docker push --all-tags ghcr.io/tibo-ulens/freud_bot_webconfig |