diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index f8787d985..4c33817f7 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -12,42 +12,48 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - - name: build and push to github packages - uses: docker/build-push-action@v1 + - name: Log in to the ghcr + uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - tag_with_ref: true - tag_with_sha: false - - name: build and push to docker hub - uses: docker/build-push-action@v1 + - name: Log in to the docker + uses: docker/login-action@v1 with: - repository: projecteru2/core username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - tag_with_ref: true - tag_with_sha: false - - name: "[debug version] build and push to docker hub" - uses: docker/build-push-action@v1 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 with: - build_args: KEEP_SYMBOL=1 - repository: projecteru2/core - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tags: ${{ github.sha }}-debug + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=tag - - name: "[debug version] build and push to github packages" - uses: docker/build-push-action@v1 + - name: Build and push image + if: ${{ steps.meta.outputs.tags != '' }} + uses: docker/build-push-action@v2 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - build_args: KEEP_SYMBOL=1 - tags: ${{ github.sha }}-debug + context: "." + push: true + tags: ${{ steps.meta.outputs.tags }} + + - name: "[debug version] Build and push image" + uses: docker/build-push-action@v2 + with: + context: "." + push: true + build_args: | + KEEP_SYMBOL=1 + tags: | + ${{ github.repository }}:${{ github.sha }}-debug + ghcr.io/${{ github.repository }}:${{ github.sha }}-debug diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 214d9003c..fb09f039d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,13 +13,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.7 + - name: golangci-lint - uses: golangci/golangci-lint-action@v1 + uses: golangci/golangci-lint-action@v3 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.42 + version: v1.44.2 # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index d3eec01b5..897b2c4a8 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.17.7 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca1db4e5d..292da165e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,6 @@ jobs: container: projecteru2/footstone:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: unit tests run: make test