fix: update staffeln cinder policy #3665
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
name: image | |
on: | |
pull_request: | |
paths-ignore: | |
- images/** | |
- go.mod | |
- go.sum | |
push: | |
branches: | |
- main | |
- stable/* | |
release: | |
types: | |
- published | |
permissions: | |
packages: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
- name: Install Earthly | |
uses: earthly/actions-setup@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
run: earthly +image --tag ${{ github.sha }} | |
env: | |
EARTHLY_CI: true | |
EARTHLY_PUSH: "${{ github.event_name == 'push' || github.event_name == 'release' }}" | |
EARTHLY_REMOTE_CACHE: ghcr.io/vexxhost/atmosphere:cache | |
publish: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' | |
needs: | |
- build | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Promote image | |
uses: akhilerm/tag-push-action@f35ff2cb99d407368b5c727adbcc14a2ed81d509 # v2.2.0 | |
with: | |
src: ghcr.io/vexxhost/atmosphere:${{ github.sha }} | |
dst: ghcr.io/vexxhost/atmosphere:${{ github.event.release.tag_name }} |