Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rustinmyeye authored May 16, 2024
1 parent d80e520 commit 29023f2
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: Docker Image CI

on:
Expand All @@ -16,3 +17,41 @@ jobs:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag token-bouncer:$(date +%s)

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Archive Docker image
uses: actions/upload-artifact@v2
with:
name: token-bouncer
path: .

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}-${{ github.run_id }}
release_name: Release ${{ github.run_number }}-${{ github.run_id }}
body: |
Release of version main.
## Docker Image
```
docker pull token-bouncer:$(date +%s)
```
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .
asset_name: token-bouncer:$(date +%s) # Update the asset name as per your Docker image tag
asset_content_type: application/octet-stream

0 comments on commit 29023f2

Please sign in to comment.