diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..da390e1 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,7 @@ +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - run: docker build . \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/push-to-master.yml similarity index 85% rename from .github/workflows/build.yml rename to .github/workflows/push-to-master.yml index e9b0fbc..4f6f180 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/push-to-master.yml @@ -1,4 +1,6 @@ -on: [push, pull_request] +on: + push: + branches: ['master'] jobs: build: runs-on: ubuntu-latest @@ -16,6 +18,7 @@ jobs: - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@master with: - name: sandersaares/test123 + name: sandersaares/test123:cb username: sandersaares password: ${{ secrets.docker_hub_token }} + snapshot: true \ No newline at end of file diff --git a/.github/workflows/push-to-publish-latest.yml b/.github/workflows/push-to-publish-latest.yml new file mode 100644 index 0000000..bea5f2d --- /dev/null +++ b/.github/workflows/push-to-publish-latest.yml @@ -0,0 +1,24 @@ +on: + push: + branches: ['publish-latest'] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - id: make_version_string + uses: ./.github/actions/make-version-string + with: + assemblyInfoPath: AssemblyInfo.cs + - uses: ./.github/actions/expand-tokens + env: + VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }} + with: + path: Constants.cs + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: sandersaares/test123:latest + username: sandersaares + password: ${{ secrets.docker_hub_token }} + snapshot: true