Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Mar 9, 2022
1 parent 67360b6 commit 06977aa
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 30 deletions.
53 changes: 29 additions & 24 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,47 @@ 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
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: ${{ steps.meta.outputs.tags != '' }}
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
12 changes: 9 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
container: projecteru2/footstone:latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: unit tests
run: make test

0 comments on commit 06977aa

Please sign in to comment.