goreleaser try 2 #33
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: Workflow | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
packages: write | |
# To report GitHub Actions status checks | |
statuses: write | |
concurrency: | |
group: | | |
'${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
# testing-image: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# - name: Log in to the Container registry | |
# uses: docker/login-action@5139682d94efc37792e6b54386b5b470a68a4737 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Docker Meta | |
# id: meta | |
# uses: docker/metadata-action@v5 | |
# with: | |
# images: | | |
# ghcr.io/${{ github.repository }} | |
# - name: Build and push | |
# uses: docker/build-push-action@v5 | |
# with: | |
# context: . | |
# file: testing.Dockerfile | |
# platforms: linux/amd64 | |
# labels: ${{ steps.meta.outputs.labels }} | |
# push: true | |
# tags: ghcr.io/${{ github.repository }}:testing-${{ github.sha }} | |
# cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:testing-buildcache | |
# cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:testing-buildcache,mode=max | |
testing: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
cache: false | |
- name: Containers | |
run: "docker ps -a" | |
shell: bash | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
- name: Task Test | |
run: "task docker-test" | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "^1.22" | |
cache: true | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }} |