Do not generate changelog #10
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: runecs | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build-and-push-docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Get Git Tag | |
id: git_tag | |
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
- name: Get Commit Hash | |
id: commit_hash | |
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Build and tag | |
run: | | |
docker build -t ${{ secrets.DOCKER_USERNAME }}/runecs:latest . | |
docker tag ${{ secrets.DOCKER_USERNAME }}/runecs:latest ${{ secrets.DOCKER_USERNAME }}/runecs:${{ env.COMMIT_HASH }} | |
docker tag ${{ secrets.DOCKER_USERNAME }}/runecs:latest ${{ secrets.DOCKER_USERNAME }}/runecs:${{ env.TAG }} | |
- name: Push Docker image | |
run: | | |
docker push ${{ secrets.DOCKER_USERNAME }}/runecs:latest | |
docker push ${{ secrets.DOCKER_USERNAME }}/runecs:${{ env.COMMIT_HASH }} | |
docker push ${{ secrets.DOCKER_USERNAME }}/runecs:${{ env.TAG }} | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.23.1' | |
cache: true | |
# More assembly might be required: Docker logins, GPG, etc. It all depends | |
# on your needs. | |
- uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} |