-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Dockerize latest version | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
dockerize_and_push: | ||
name: Dockerize and push to GHCR | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Nixpacks | ||
run: | | ||
curl -LO https://github.com/railwayapp/nixpacks/releases/download/v1.26.0/nixpacks-v1.26.0-amd64.deb | ||
sudo dpkg -i nixpacks-v1.26.0-amd64.deb | ||
# - name: Copy .env | ||
# run: cp .env.example .env | ||
- name: Build image | ||
run: nixpacks build . | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Tag image | ||
run: docker tag $(docker images --format='{{.ID}}' | head -1) ghcr.io/mrcnk/faasade:$(git rev-parse --short HEAD) | ||
- name: Push to GHCR | ||
run: docker push ghcr.io/mrcnk/faasade:$(git rev-parse --short HEAD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Promote Docker image to latest | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
dockerize_and_push: | ||
name: Tag latest and push to GHCR | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Tag image | ||
run: docker buildx imagetools create ghcr.io/mrcnk/faasade:$(git rev-parse --short HEAD) --tag ghcr.io/mrcnk/faasade:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters