Skip to content

Commit

Permalink
Merge pull request #1 from standout/feature/release-github-docker-rep…
Browse files Browse the repository at this point in the history
…ository

Publish new images on releases
  • Loading branch information
svenne87 authored Jan 8, 2021
2 parents 4c081b9 + 40548ec commit 61e1e92
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# integrationer-steps-ruby-runner
# 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:<version> .
docker push ghcr.io/standout/integrationer-steps-ruby-runner:latest
docker push ghcr.io/standout/integrationer-steps-ruby-runner:<version>
```

0 comments on commit 61e1e92

Please sign in to comment.