Skip to content

Commit

Permalink
Merge 0557757 into 58eac93
Browse files Browse the repository at this point in the history
  • Loading branch information
kayra1 authored Oct 3, 2024
2 parents 58eac93 + 0557757 commit e744ae1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 44 deletions.
52 changes: 14 additions & 38 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,20 @@ concurrency:
jobs:
build:
name: Build snap
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build snap locally
uses: snapcore/action-build@v1
id: build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]

- name: Get snapcraft track
if: ${{ github.ref_protected }}
id: track
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
echo "::set-output name=track::latest"
elif [[ "${{ github.ref_name }}" =~ ^stable\/(.+) ]]; then
TRACK_NAME=${BASH_REMATCH[1]}
echo "::set-output name=track::$TRACK_NAME"
else
echo "Branch name does not match expected patterns. Exiting."
exit 1
fi
- name: Upload snap artifact
id: upload-snap
uses: actions/upload-artifact@v4
with:
name: snap
path: ${{ steps.build.outputs.snap }}

- name: publish snap
if: ${{ github.ref_protected }}
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: ${{ steps.track.outputs.track }}/edge
release:
name: Release snap
needs:
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
channel: 1.17/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
secrets:
snap-store-token: ${{ secrets.SNAP_STORE_TOKEN }}
permissions:
contents: write # Needed to create GitHub release

test-service:
name: Test snap service
Expand All @@ -66,7 +42,7 @@ jobs:
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: snap
name: ${{needs.build.outputs.artifact-prefix}}-amd64

- name: Install snap
run: |
Expand Down
6 changes: 0 additions & 6 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ architectures:
build-for: [amd64]
- build-on: [arm64]
build-for: [arm64]
- build-on: [armhf]
build-for: [armhf]
- build-on: [ppc64el]
build-for: [ppc64el]
- build-on: [s390x]
build-for: [s390x]


package-repositories:
Expand Down

0 comments on commit e744ae1

Please sign in to comment.