Bump actions/download-artifact from 4 to 8 #81
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Run Common Setup | |
| uses: ./.github/actions/setup | |
| - name: Build Templates | |
| run: just build-templates | |
| - name: Run Linter | |
| run: just lint | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Run Common Setup | |
| uses: ./.github/actions/setup | |
| - name: Build Templates | |
| run: just build-templates | |
| - name: Run Tests | |
| run: just test | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Run Common Setup | |
| uses: ./.github/actions/setup | |
| - name: Build Application | |
| run: just build | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| # TODO: remove go branch condition after merging go branch to main | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/go' | |
| with: | |
| name: pkgstatsd | |
| path: pkgstatsd | |
| retention-days: 7 | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| # TODO: remove go branch condition after merging go branch to main | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/go' | |
| steps: | |
| - name: Download binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pkgstatsd | |
| - name: Deploy | |
| env: | |
| SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_KEY }} | |
| KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }} | |
| DEPLOY_HOST: ${{ vars.DEPLOY_HOST }} | |
| DEPLOY_SSH_PORT: ${{ vars.DEPLOY_SSH_PORT }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 | |
| echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts | |
| chmod 600 ~/.ssh/id_ed25519 | |
| chmod +x pkgstatsd | |
| rsync -e "ssh -p ${DEPLOY_SSH_PORT}" pkgstatsd pkgstatsd@${DEPLOY_HOST}:/opt/pkgstatsd/pkgstatsd.new | |
| ssh -p "${DEPLOY_SSH_PORT}" pkgstatsd@${DEPLOY_HOST} "mv /opt/pkgstatsd/pkgstatsd.new /opt/pkgstatsd/pkgstatsd" |