diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d533f0f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Publish package on GitHub +env: + IMAGE_TAG: "ghcr.io/standout/integrationer-steps-ruby-runner:${{ GITHUB_REF:10 }}" +on: + release: + types: [published] +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Login to docker repository + run: echo ${{ secrets.GH_PACKAGES_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Build docker image + run: | + docker pull ghcr.io/standout/integrationer-steps-ruby-runner:latest + docker build \ + -t $IMAGE_TAG \ + -t ghcr.io/standout/integrationer-steps-ruby-runner:latest \ + --cache-from=ghcr.io/standout/integrationer-steps-ruby-runner:latest \ + . + - name: Release docker image + run: | + docker push $IMAGE_TAG + docker push ghcr.io/standout/integrationer-steps-ruby-runner:latest diff --git a/README.md b/README.md index 8971000..844844b 100644 --- a/README.md +++ b/README.md @@ -1 +1,10 @@ -# integrationer-steps-ruby-runner \ No newline at end of file +# integrationer-steps-ruby-runner +### Build and push to GitHub packages +A new release will publish a new image on GitHub packages. + +Creating manual release: +```bash +docker build -t ghcr.io/standout/integrationer-steps-ruby-runner:latest -t ghcr.io/standout/integrationer-steps-ruby-runner: . +docker push ghcr.io/standout/integrationer-steps-ruby-runner:latest +docker push ghcr.io/standout/integrationer-steps-ruby-runner: +```