Skip to content

Commit

Permalink
move tarball creation above docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
blesswinsamuel committed Jan 12, 2024
1 parent 6106a8f commit 5799a34
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,10 @@ jobs:
args: "--locked --release"
strip: true

- uses: blesswinsamuel/github-actions/docker-build-and-push@main
with:
checkout: false
docker-registry: docker.io
docker-image-name: ${{ github.repository }}
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
docker-build-platforms: linux/arm64

- name: Create release tarball
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
docker run --rm --entrypoint cat docker.io/${{ github.repository }}:${{ github.ref_name }} /router-monitor > router-monitor
cp ./target/aarch64-unknown-linux-gnu/release/router-monitor ./router-monitor
chmod +x router-monitor
tar czf router-monitor-aarch64-linux.tar.gz router-monitor
Expand All @@ -48,3 +36,15 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
artifacts: router-monitor-aarch64-linux.tar.gz

- uses: blesswinsamuel/github-actions/docker-build-and-push@main
with:
checkout: false
docker-registry: docker.io
docker-image-name: ${{ github.repository }}
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
docker-build-platforms: linux/arm64

0 comments on commit 5799a34

Please sign in to comment.