diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b395866..3008e01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@master with: - submodules: 'recursive' + submodules: "recursive" - name: Test uses: docker://golang:latest with: @@ -47,12 +47,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true - - name: Publish to registry - if: "contains(github.ref, 'master') && !contains(toJSON(github.event.commits.*.msg), '[skip-ci]')" - uses: elgohr/Publish-Docker-Github-Action@master + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: maxcleme/beadcolors - dockerfile: Dockerfile.website username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - tags: ${{ steps.tagging.outputs.new_tag }},latest + - name: Build and push + uses: docker/build-push-action@v6 + with: + tags: + - maxcleme/beadcolors:${{ steps.tagging.outputs.new_tag }} + - maxcleme/beadcolors:latest + push: true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..f2448c7 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,29 @@ +name: PR Checks + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + submodules: "recursive" + - name: Test + uses: docker://golang:latest + with: + entrypoint: /bin/sh + args: | + -c "\ + cd generation/ && go test ./... + - name: Test Generation + uses: docker://golang:latest + with: + entrypoint: /bin/sh + args: | + -c "\ + cd generation/ && go run ./... ../raw ../gen + - name: Build + uses: docker/build-push-action@v6 + with: + push: false diff --git a/Dockerfile.website b/Dockerfile similarity index 100% rename from Dockerfile.website rename to Dockerfile