diff --git a/.github/workflows/image_creation.yaml b/.github/workflows/image_creation.yaml index dcffe22..6de4781 100644 --- a/.github/workflows/image_creation.yaml +++ b/.github/workflows/image_creation.yaml @@ -1,8 +1,6 @@ -name: Build Push +name: Build Push Prod on: push: - branches: - - master tags: - '*' jobs: @@ -16,6 +14,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Exit if not on master + if: endsWith(github.ref, master) == false + run: exit 1 + - name: Setup Quemu uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml new file mode 100644 index 0000000..8466507 --- /dev/null +++ b/.github/workflows/test_workflow.yml @@ -0,0 +1,28 @@ +name: dev workflow +on: + push: + branches: + - main + - dev + - 'feature/**' +jobs: + build: + runs-on: ubuntu-latest + env: + TOKEN: ${{ secrets.TOKEN }} + USERNAME: ${{ vars.USERNAME }} + TAG_VERSION: ${{ github.ref_name }} + steps: + - name: + uses: actions/checkout@v4 + + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Build + run: go build -v ./... + + - name: test with go + run: go test -v ./...