feat: initial commit #1
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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'aws/important-s3-buckets/**' | |
permissions: | |
packages: write # needed for ghcr.io access | |
id-token: write # needed for keyless signing | |
contents: write # needed for git operations | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flux CLI | |
uses: fluxcd/flux2/action@main | |
with: | |
version: 'latest' | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package and Push to OCI | |
run: | | |
flux push artifact oci://ghcr.io/spacelift-io-examples/oci-repository-example:$(git rev-parse HEAD) \ | |
--path="./aws/important-s3-buckets" \ | |
--source="$(git config --get remote.origin.url)" \ | |
--revision="$(git branch --show-current)@sha1:$(git rev-parse HEAD)" |