Skip to content

Commit

Permalink
chore: update mage action to latest action which allows install (#2061)
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps authored Aug 30, 2023
1 parent a8ffa95 commit 402a8a0
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 36 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ jobs:
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | sh
- uses: GeorgeMac/mage-action@gm/tools-add-path-debug
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: dagger:run test:cli
install-only: true

- name: Run CLI Tests
run: mage dagger:run test:cli

test:
name: Integration Tests
Expand All @@ -62,10 +65,13 @@ jobs:
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=${DAGGER_VERSION} sh
- uses: GeorgeMac/mage-action@gm/tools-add-path-debug
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: dagger:run "test:integration ${{ matrix.test }}"
install-only: true

- name: Run Integration Tests
run: mage dagger:run "test:integration ${{ matrix.test }}"

- name: Upload Flipt Service Logs
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -94,7 +100,10 @@ jobs:
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=${DAGGER_VERSION} sh
- uses: GeorgeMac/mage-action@gm/tools-add-path-debug
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: dagger:run test:ui
install-only: true

- name: Run UI Tests
run: mage dagger:run test:ui
9 changes: 6 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ jobs:
curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b $GITHUB_WORKSPACE/bin
echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- uses: magefile/mage-action@v2
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: prep
install-only: true

- name: Prep Build
run: mage prep

- name: GoReleaser (Nightly) Build
uses: goreleaser/goreleaser-action@v4
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release-tag-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
username: "${{ github.repository_owner }}"
password: ${{ secrets.GITHUB_TOKEN }}

- uses: GeorgeMac/mage-action@gm/tools-add-path-debug
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: prep
install-only: true

- name: Tag and Push latest
env:
Expand All @@ -70,4 +70,3 @@ jobs:
docker pull ghcr.io/flipt-io/flipt:$TAG
skopeo copy --all docker://ghcr.io/flipt-io/flipt:$TAG docker://ghcr.io/flipt-io/flipt:latest
fi
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ jobs:
curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b $GITHUB_WORKSPACE/bin
echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- uses: magefile/mage-action@v2
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: prep
install-only: true

- name: Prep Build
run: mage prep

- name: GoReleaser Build
uses: goreleaser/goreleaser-action@v4
Expand Down Expand Up @@ -126,11 +129,6 @@ jobs:
username: "${{ github.repository_owner }}"
password: ${{ secrets.GITHUB_TOKEN }}

- uses: GeorgeMac/mage-action@gm/tools-add-path-debug
with:
version: latest
args: prep

- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
Expand All @@ -152,6 +150,13 @@ jobs:
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}

- name: Install Mage
uses: magefile/mage-action@v2
with:
install-only: true

# TODO: see if we can wire up the `release-tag-latest` workflow to run
# after release with the same tag
- name: Tag and Push latest
env:
TAG: ${{ github.ref_name }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ jobs:
curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b $GITHUB_WORKSPACE/bin
echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- uses: magefile/mage-action@v2
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: prep
install-only: true

- name: Prep Build
run: mage prep

- name: GoReleaser (Snapshot) Build
uses: goreleaser/goreleaser-action@v4
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ jobs:
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | sh
- name: Unit Test ${{ matrix.database }}
uses: GeorgeMac/mage-action@gm/tools-add-path-debug
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: dagger:run "test:database ${{ matrix.database }}"
install-only: true

- name: Unit Test ${{ matrix.database }}
run: mage dagger:run "test:database ${{ matrix.database }}"

- name: Upload Coverage
uses: codecov/[email protected]
Expand Down Expand Up @@ -79,10 +81,10 @@ jobs:
cd /usr/local
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=${DAGGER_VERSION} sh
- uses: GeorgeMac/mage-action@gm/tools-add-path-debug
- name: Install Mage
uses: magefile/mage-action@v2
with:
version: latest
args: dagger:run test:migration
install-only: true

- name: Upload Coverage
uses: codecov/[email protected]
- name: Run UI Tests
run: mage dagger:run test:migration

0 comments on commit 402a8a0

Please sign in to comment.