| name: publish |
| |
| on: |
| release: |
| types: |
| - published |
| |
| jobs: |
| ansible-collection: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout project |
| uses: actions/checkout@v3 |
| |
| - name: Build and publish collection |
| uses: artis3n/ansible_galaxy_collection@v2 |
| with: |
| api_key: "${{ secrets.GALAXY_API_KEY }}" |
| |
| - name: Get release |
| uses: bruceadams/get-release@v1 |
| id: get_release |
| env: |
| GITHUB_TOKEN: ${{ github.token }} |
| |
| - name: Get file name for collection |
| id: get_filename |
| run: echo ::set-output name=filename::$(ls *.tar.gz) |
| |
| - name: Upload release asset |
| uses: actions/upload-release-asset@v1 |
| env: |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| with: |
| upload_url: ${{ steps.get_release.outputs.upload_url }} |
| asset_path: ./${{ steps.get_filename.outputs.filename }} |
| asset_name: ${{ steps.get_filename.outputs.filename }} |
| asset_content_type: application/gzip |
| |
| image: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Install QEMU static binaries |
| uses: docker/setup-qemu-action@v2 |
| |
| - name: Configure Buildkit |
| uses: docker/setup-buildx-action@v2 |
| |
| - name: Checkout project |
| uses: actions/checkout@v3 |
| |
| - name: Authenticate with Quay.io |
| uses: docker/login-action@v2 |
| with: |
| registry: quay.io |
| username: ${{ secrets.QUAY_USERNAME }} |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| |
| - name: Generate image tag |
| id: image_tag |
| run: | |
| echo ::set-output name=tag::$(echo ${{ github.event.release.tag_name }} | sed 's/^v//') |
| |
| - name: Build image |
| uses: docker/build-push-action@v3 |
| with: |
| context: . |
| cache-from: type=gha |
| cache-to: type=gha,mode=max |
| push: true |
| tags: | |
| quay.io/vexxhost/atmosphere:latest |
| quay.io/vexxhost/atmosphere:${{ steps.image_tag.outputs.tag }} |