mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
31 lines
964 B
YAML
31 lines
964 B
YAML
name: Publish Staging
|
|
on:
|
|
push:
|
|
branches:
|
|
- cicd
|
|
jobs:
|
|
release:
|
|
name: Push Docker image to GitHub Packages
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v2
|
|
- name: Login to GitHub Docker Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: docker.pkg.github.com
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Format repository
|
|
run: |
|
|
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
|
- name: Build container image
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
tags: |
|
|
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/ccash:${{ github.sha }}
|
|
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/ccash:latest
|