Update golang:1.23.4 Docker digest to b01f7c7 #2771
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: pre-commit | |
uses: markushinz/actions/pre-commit@v1.1.11 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
- name: Test and Build | |
run: | | |
go mod download | |
go mod tidy | |
git diff --exit-code | |
go install github.com/ory/go-acc@latest | |
go-acc ./... -o cover.out -- -race | |
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o aws-ses-pop3-server-x86_64-Linux | |
CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -o aws-ses-pop3-server-x86_64-Darwin | |
CGO_ENABLED=0 GOARCH=arm64 GOOS=darwin go build -o aws-ses-pop3-server-arm64-Darwin | |
- name: SonarCloud Scan | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Docker - Set up Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker - Login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Version | |
uses: markushinz/actions/version@v1.1.11 | |
with: | |
minimum_version_command: cat version.txt | |
- name: Docker - Build and Push | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
tags: | | |
${{ github.repository }}:latest | |
${{ github.repository }}:v${{ env.VERSION }} | |
cache-from: type=registry,ref=${{ github.repository }}:buildcache | |
cache-to: type=registry,ref=${{ github.repository }}:buildcache,mode=max | |
- name: Release | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" gh release create "v${VERSION}" --generate-notes ./aws-ses-pop3-server-x86_64-Linux ./aws-ses-pop3-server-x86_64-Darwin ./aws-ses-pop3-server-arm64-Darwin |