Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the workflow to build rke-etcd-backup binary in build-and-push job #215

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ jobs:
- name: Build
run: |
./scripts/ci
- name: Upload rke-etcd-backup artifact
if: github.event_name == 'push' && github.ref_type == 'tag'
uses: actions/upload-artifact@v4
with:
name: rke-etcd-backup-${{ github.run_number }}-${{ github.run_attempt }}
path: bin/rke-etcd-backup
if-no-files-found: error
retention-days: 1

build-and-push:
permissions:
Expand All @@ -58,13 +50,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download rke-etcd-backup artifact
uses: actions/download-artifact@v4
with:
name: rke-etcd-backup-${{ github.run_number }}-${{ github.run_attempt }}
path: .
- name: Setup Go
uses: actions/setup-go@v5
- name: Build
run: |
./scripts/build
env:
GOARCH: ${{ matrix.arch }}
- name: Fix permissions
run: |
mv bin/rke-etcd-backup .
chmod 755 rke-etcd-backup
- name: Docker meta
id: meta
Expand Down