Fix the screwed port number in Nginx config and enable sudo-less docker commands in Sonatype Nexus Repository #58
Workflow file for this run
This file contains 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
# Copyright Jiaqi Liu | |
--- | |
name: CI/CD | |
"on": | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test-example: | |
uses: ./.github/workflows/test-plugin-example.yml | |
# referencing release.yml - get-go-version | |
get-go-version: | |
runs-on: ubuntu-latest | |
outputs: | |
go-version: ${{ steps.get-go-version.outputs.go-version }} | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- name: 'Determine Go version' | |
id: get-go-version | |
run: | | |
echo "Found Go $(cat .go-version)" | |
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT | |
gorelease-config-check: | |
name: Checking if gorelease configuration is valid | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | |
sudo apt update | |
sudo apt install goreleaser -y | |
goreleaser check .goreleaser.yml | |
tests: | |
name: Go Tests | |
needs: [test-example, get-go-version, gorelease-config-check] | |
outputs: | |
outcome: ${{ job.status }} | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: ${{ needs.get-go-version.outputs.go-version }} | |
- run: | | |
make build | |
make test | |
release: | |
needs: [tests] | |
if: ${{ github.ref == 'refs/heads/master' && github.repository != 'QubitPi/hashicorp-packer-plugin-scaffolding' }} | |
uses: ./.github/workflows/release.yml | |
secrets: inherit | |
slack-notification: | |
name: Send Slack Notification | |
if: github.ref != 'refs/heads/master' | |
needs: tests | |
uses: QubitPi/hashicorp-aws/.github/workflows/slack-notification.yml@master | |
with: | |
job-status: ${{ needs.tests.outputs.outcome }} | |
secrets: | |
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} |