Skip to content

Commit

Permalink
Merge pull request #561 from miniduikboot/chore/update-gh-actions
Browse files Browse the repository at this point in the history
Update Github actions
  • Loading branch information
miniduikboot committed Jan 25, 2024
2 parents c1fb433 + 165621a commit d06b21b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ on:
paths:
- '.github/workflows/ci.yml'
- 'src/**/**'
- '.gitmodules'
- 'build.cake'
pull_request:
paths:
- '.github/workflows/ci.yml'
- 'src/**/**'
- '.gitmodules'
- 'build.cake'

jobs:
Expand All @@ -20,9 +18,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
uses: actions/checkout@v4

- uses: actions/cache@v3
with:
Expand Down Expand Up @@ -54,4 +50,4 @@ jobs:
- name: Push NuGet package
if: github.ref_type == 'tag'
run: |
dotnet nuget push ./build/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_IMPOSTOR }}
dotnet nuget push ./build/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_IMPOSTOR }}
20 changes: 8 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
paths:
- 'src/Impostor.Server/**'
- 'src/Impostor.Shared/**'
- '.gitmodules'
- '.github/workflows/docker.yml'
- 'Dockerfile'
tags:
Expand All @@ -15,7 +14,6 @@ on:
paths:
- 'src/Impostor.Server/**'
- 'src/Impostor.Shared/**'
- '.gitmodules'
- '.github/workflows/docker.yml'
- 'Dockerfile'

Expand All @@ -25,9 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
Expand All @@ -48,22 +44,22 @@ jobs:
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=versionsuffix::${VERSIONSUFFIX}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo name=version::${VERSION} >> $GITHUB_OUTPUT
echo name=tags::${TAGS} >> $GITHUB_OUTPUT
echo name=versionsuffix::${VERSIONSUFFIX} >> $GITHUB_OUTPUT
echo name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand Down
Empty file removed .gitmodules
Empty file.

0 comments on commit d06b21b

Please sign in to comment.